package com.jjm.interceptores;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class LoginCandidatoInterceptor implements Interceptor{

	private static final long serialVersionUID = 1L;


	public void destroy() {
	}

	public void init() {
	}

	public String intercept(ActionInvocation arg0) throws Exception {
		String candidatoId = (String) arg0.getInvocationContext().getSession().get("candidatoId");
		if(candidatoId == null)
		{
			return "sesionCaducada";
		}
		else
		{
			return arg0.invoke();
		}
	}

}
